// 封装请求方法
const myRequest = function (url, method, data, successCallback) {
  // 获取token
  const token = wx.getStorageSync('token');
  wx.request({
    url: url,
    method: method,
    data: data,
    header: {
      'content-type': 'application/json', // 默认值
      'X-Nideshop-Token': token
    },
    // 成功的回调，调用时传入
    success: successCallback
  })
};

export default myRequest;